﻿using System;
using System.Collections.Generic;

using MyCtp.Model;

namespace TradeClient.Logic.TradeCore
{
    /// <summary>
    /// CTP账户（一个CTP账户绑定一个CtpTrade）
    /// </summary>
    public class CtpAccount
    {
        public CtpAccount()
        {
            Positions = new List<CThostFtdcInvestorPositionField>();
            PositionDetails = new List<CThostFtdcInvestorPositionDetailField>();
            PositionCombineDetails = new List<CThostFtdcInvestorPositionCombineDetailField>();
        }

        /// <summary>
        /// 真实/模拟环境
        /// </summary>
        public SimulationRealType ClassType { get; set; }

        /// <summary>
        /// 经纪商
        /// </summary>
        public string Broker { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        public string Account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 该账户关联的交易接口对象
        /// </summary>
        public CtpTrade CtpTradeObject { get; set; }

        /// <summary>
        /// 账户信息
        /// </summary>
        public CThostFtdcTradingAccountField Information { get; set; }

        /// <summary>
        /// 综合持仓
        /// </summary>
        public List<CThostFtdcInvestorPositionField> Positions { get; set; }

        /// <summary>
        /// 持仓明细
        /// </summary>
        public List<CThostFtdcInvestorPositionDetailField> PositionDetails { get; set; }

        /// <summary>
        /// 组合持仓明细
        /// </summary>
        public List<CThostFtdcInvestorPositionCombineDetailField> PositionCombineDetails { get; set; }
    }
}
